package beantoxml;

import javax.xml.bind.JAXBException;
import java.util.Date;

public class Test {
    public static void main(String[] args) throws JAXBException {
        Course course = new Course();
        course.setId("1");
        course.setUrl("https://blog.csdn.net/iteye_15343/article/details/82036150");
        course.setDate(new Date());
        Student student = new Student();
        student.setCourse(course);
        String xml = BeanToXmlUtil.objectToXml(student, Student.class);
        System.out.println(xml);
    }
}
